package com.cqrcb.cloud.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author ：29520
 * @date ：Created in 2021/8/4 15:01
 * @description：
 * @modified By：
 * @version:
 */
public class DateUtil {

    public final static String yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
    public final static SimpleDateFormat yyyyMMddHHmmssSDF = new SimpleDateFormat(yyyyMMddHHmmss);

    public static Date timestampToDate(long time){
        return new Date(time);
    }

    public static String timestampToDateStr(long time){
        Date date = new Date(time);
        String format = yyyyMMddHHmmssSDF.format(date);
        return format;
    }
}
